﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ShengHePager.aspx.cs" Inherits="PropertyAppraisal.Auditing.ShengHePager" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
     <link href="../jquery-easyui-1.3.5/themes/default/easyui.css" rel="stylesheet" />
    <link type="/text/css" href="../jquery-easyui-1.3.5/themes/icon.css" rel="stylesheet" />
    <link href="../jquery-easyui-1.3.5/demo/demo.css" rel="stylesheet" />

    <%--<script type="text/javascript" src="easyui/js/jquery-1.8.0.min.js"></script>--%>

    <script type="text/javascript" src="../jquery-easyui-1.3.5/jquery-1.7.2-min.js"></script>
    <script type="text/javascript" src="../jquery-easyui-1.3.5/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="../jquery-easyui-1.3.5/easyloader.js"></script>


    <script type="text/javascript" src="../easyui/jquery.params.js"></script>

    <script>

        
    </script>
</head>
<body>
    <div class="demo-info">
        <div class="demo-tip icon-tip"></div>
        <%--<div>Fill the form and submit it.</div>--%>
    </div>
    <h2 id="shenhe"></h2>
    <div style="margin: 0;"></div>
    <form id="form1" runat="server">
        <div class="easyui-panel" fit="true" style="border: none;">
            <div style="margin-left: 30px;" id="ff">
                <table>
                    <tr>
                        <td>审核意见：</td>
                        <td style="padding-left: 50px;">
                            <input class="easyui-validatebox" id="xiang" type="text" style="width: 800px;" data-options="required:true" />
                        </td>
                    </tr>
                </table>
            </div>
            <div style="text-align: center; padding: 5px">
                <a href="javascript:void(0)" class="easyui-linkbutton" onclick="submitForm()">审核通过</a>
                <a href="javascript:void(0)" class="easyui-linkbutton" onclick="submitForm2()">审核不通过</a>
            </div>
        </div>
    </form>

    <script type="text/javascript">

        var P_ReportNumber = $.query.get("id");//项目号
        var P_Type = $.query.get("state");//项目号
        var P_State = "";
        if (P_Type == 5) {
            P_State = "初审";
            $("#shenhe").text(P_State);
        }
        if (P_Type == 7) {
            P_State = "终审";
            $("#shenhe").text(P_State);
        }
        
        function submitForm() {
            var Yijian = $("#xiang").val();
            $.ajax({
                type: "post", //要用post方式                 
                url: "ShengHePager.aspx/submins",//方法所在页面和方法名
                data: "{'ProjectNumber':'" + P_ReportNumber + "','Auditing_Opinion':'" + Yijian + "','auditing_Type':'" + P_State + "'}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    var json = eval("(" + data.d + ")");

                    if (json == 1) {
                        $.messager.alert("提示信息", "审核通过");
                        location.href = "/Auditing/ShengHeList.aspx";
                    }
                }
            });
        }
        function submitForm2() {
            var Yijian = $("#xiang").val();
            $.ajax({
                type: "post", //要用post方式                 
                url: "ShengHePager.aspx/submins2",//方法所在页面和方法名
                data: "{'ProjectNumber':'" + P_ReportNumber + "','Auditing_Opinion':'" + Yijian + "','auditing_Type':'" + P_State + "'}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    var json = eval("(" + data.d + ")");

                    if (json == 1) {
                        $.messager.alert("提示信息", "审核不通过", "info", function (r) {

                            parent.addTab("审核列表", "/Auditing/ShengHeList.aspx", "icon-chart-organisation", true);
                             
                            
                        });
                        
                    }
                }
            });
        }
        //调用父页面的赋值方法   
        $(function () {

            var P_ReportNumber = $.query.get("id");//项目号
            var P_Type = $.query.get("state");//项目号
            var P_State = "";
            if (P_Type == 5)
            {
                P_State = "初审";
                $("#shenhe").text(P_State);
            }
            if (P_Type == 7)
            {
                P_State = "终审";
                $("#shenhe").text(P_State);
            }
        })
    </script>
</body>
</html>
